package net.wanho.service.impl;

import lombok.RequiredArgsConstructor;
import net.wanho.entity.User;
import net.wanho.mapper.UserMapper;
import net.wanho.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Author：汤小洋
 * Date：2023-12-22 10:58
 * Description：<描述>
 */
@Service
@RequiredArgsConstructor
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService {

    private final UserMapper userMapper;

    @Override
    public void add(User user) {
        userMapper.insert(user);
    }
}
